<template>
  <div>
    <h1>充值页</h1>
    <el-input placeholder="请输入充值金额" v-model="money"></el-input>
    <el-button @click="cz">充值</el-button>
  </div>
</template>

<script>
export default {
    data(){
        return{
            money:'',
            userid:localStorage.getItem('userid')
        }
    },
    methods:{
        cz(){
            this.axios.get('/chongzhi?money='+this.money+'&userid='+this.userid).then(res=>{
                console.log(res)
                if(res.data.code==200){
                    window.location.href=res.data.url
                }
            })
        }
    }
}
</script>

<style>

</style>